
/**
 * 是否是图片格式
 * @param filename
 */
export const isImageFormat = (filename?: string) => {
  const formats = /\.(png|ico|jpg|jpeg|webp|gif)$/i;
  return formats.test(filename || '');
}
